This invention relates to a network system.
It has been known in factory automation (FA) to connect a plurality of programmable controllers (PLC) through a network for controlling a FA system as a whole by operating them in cooperation and in synchronism. In such an application, the plurality of PLC may be connected to a network with general-purpose serial communication ports. Such a network connecting a plurality of PLC may be provided with a programmable terminal (PT) which may be a programmable display device for displaying the contents of internal memories of the units that form these PLC (for storing data on the operations of these units as well as data for controlling their operations) and changing the contents of such internal memories such that each of these PLC can be controlled.
When a network containing PLC and PT is formed by using a general-purpose serial communication circuit, the so-called data link function (to be described below) is used among the PLC such that data can be shared in common. If data are to be exchanged between PLC and PT by command-response communication as an event, it has been known, as shown in FIG. 1, to connect each PLC 1 to one network 2 corresponding to the general-purpose serial communication port of each PLC 1 and to each PT 3 to another network 4 corresponding to the general-purpose serial communication port of each PT 3. These networks 2 and 4 are then connected to the serial communication ports of another PLC 5 referred to as the parent station. Even where a network including only PLC is to be formed with a general-purpose serial communication circuit, if data link and command-response communications as events are to be carried out, such a network was conventionally formed as shown in FIG. 1 with the PT 3 therein replaced by PLC, separately providing a network for the data link and another network for command-response communication as event. In the structure shown in FIG. 1 the parent station (PLC 5) usually plays the role of controlling the communication between each PLC 1 connected to the network 2 and the parent station PLC 5. In this case, each PLC 1 connected to the network 2 is referred to as a child station. The parent station PLC 5 also serves to control the communication between each PT 3 connected to the network 4 and the parent station (PLC 5). In this situation, each PT 3 connected to the network 4 is also referred to as a child station.
With a network system thus structured, each PLC 1 transmits and receives data by data link operations through the first network 2. In the above, “data link” means the operation and function of constantly holding data (link data) on specified areas of internal memories of nodes (such as PLC) in common among the nodes on a network such that no user-prepared communication program is needed for sharing data among the nodes. Examples of data link format include the method of each PLC 1 mutually supplying (reflecting) data and the method of only the parent station reflecting the data of all child stations (PLC) while each child station reflects the data on the parent station. In the network system shown in FIG. 1, the parent station 5 serves also as a relay such that data can be exchanged between a PLC 1 connected to the first network 2 and a PT 3 connected to the second network 4.
Each PT 3 may be adapted to transmit a read/write command to the parent station PLC 5 as a relay as an event of data exchange different from the data link when a right to communicate is received, say, by obtaining a token from the parent station PLC 5. If the received command is a read command, the PT 3 receives from the parent station PLC 5 a response corresponding to this event and obtains the information stored at the address of the parent station PLC 5 specified by this event. The information corresponding to the memory of the parent station PLC 5 can thus be displayed on the monitor screen of the PT 3.
With PLC 5 serving as the parent station, preliminarily set data from each PLC 1 are collected by the parent station PLC 5 and hence each PT 3 can collect such collected data from PLC 5.
Since the PLC 1 and the PT 3 of a prior art network system must be connected to the parent station PLC 5 with mutually different general-purpose serial communication circuits, there are problems of the following kinds. Firstly, if a data link is formed among the PLC 1 and a PT 3 is to be connected to this data link, the parent station PLC 5 serving as a relay requires two general-purpose serial communication ports. A same problem also occurs with a network comprised only of PLC and formed with general-purpose serial communication circuits when a command-response communication is carried out with a data link as an event.
In view of the trend for miniaturization, however, there are PLC with only one general-purpose serial communication port. In a situation as described above, a decision must be made as to which system has a higher priority, whether or not to add units for more ports although the cost would be increased or whether or not to adopt a type of two ports on a rank.
When some data are to be held in common between the PT 3 and the PLC 1, furthermore, the data must travel through the parent station PLC 5 serving as a relay, and the process becomes more complicated and a high-speed transmission becomes impossible. If one of the PT 3 wants to read data from a PLC 1, for example, such data are first collected by data link by the parent station PLC 5 and the data-requesting PT 3 must transmit a read command to it as an event. If it is desired to have data transmitted from a PT 3 to a PLC 1, as another example, the data are first transmitted to the parent station PLC 5 and then sent to the PLC 1 by data link. Thus, the load on the parent station PLC 5 becomes heavy, resulting in increased complexity of problems and delay in data processing.
As shown in FIG. 2, memory areas to be data-linked are preliminarily specified. In other words, not all memory areas of PLC 1 and 5 are data-linked. When a PT 3 attempts to access a data-linked area, a cumbersome relay routine must be followed, as explained above. If data are to be transmitted to or received from an area not data-linked, however, the routine is even more cumbersome and the delay involved is even longer.
If a data item in area A in one of the PLC 1, as shown in FIG. 2, is to be sent to a PT 3, a user program is initially carried out within this PLC 1 to transfer this data item to area B which is already assigned to the data link. Thereafter, this data item is transferred to area C of the parent station 5 assigned to the same data link. This transfer is carried out at the timing of the data link between the PLC 1 and the parent station 5. The parent station 5 carries out a user program to transfer the received data item from area C to another area D from which it is convenient to transfer data to the PT 3. Thus, the parent station 5, upon receiving a read command from the PT 3, returns the data item from its area D to the requesting PT 3. In other words, a much more complicated routine must be carried out for this kind of data transfer. Moreover, each of the PLC 1 is required to have a user program prepared and downloaded for such internal transfer of data. Thus, the memory area to be finally accessed within the PLC 1 cannot be simply changed. Similar problem remains if the PT 3 in the above example is replaced by a PLC.